package indi.zhifa.study2024.nbr.business.curd.consign.entity.po;

import com.baomidou.mybatisplus.annotation.TableName;
import indi.zhifa.core.mpenhance.entity.po.BaseEntity;
import indi.zhifa.study2024.nbr.enums.bill.consign.ESaleType;
import indi.zhifa.study2024.nbr.enums.item.EItemUnitType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;

/**
 * <p>
 * 销售单子表，优化过的，添加诸多查询时会用到的冗余
 * </p>
 *
 * @author 织法
 * @since 2024-09-16
 */
@Data
@TableName("consign_detail_optimize")
@Schema(title = "ConsignDetailOptimizeEntity对象", description = "销售单子表，优化过的，添加诸多查询时会用到的冗余")
public class ConsignDetailOptimizeEntity extends BaseEntity {

    @Schema(title = "单据Id")
    private Long billId;

    @Schema(title = "单据No")
    private String billNo;

    @Schema(title = "单据时间")
    private Long billTime;

    @Schema(title = "门店Id")
    private Long customerId;

    @Schema(title = "销售员Id")
    private Long salesId;

    @Schema(title = "商品大类型")
    private String mainType;

    @Schema(title = "商品小类型")
    private String segmentType;

    @Schema(title = "品牌类型")
    private String brand;

    @Schema(title = "销售类型")
    private ESaleType saleType;

    @Schema(title = "商品Id")
    private Long itemId;

    @Schema(title = "商品名称")
    private String itemName;

    @Schema(title = "商品单位")
    private EItemUnitType itemUnit;

    @Schema(title = "商品单位名称")
    private String itemUnitName;

    @Schema(title = "销售数量")
    private Long count;
    @Schema(title = "销售数量-小")
    private Integer smallUnitCnt;
    @Schema(title = "销售数量-中")
    private Integer midUnitCnt;
    @Schema(title = "销售数量-大")
    private Integer largeUnitCnt;

    @Schema(title = "总金额")
    private Long amount;
    @Schema(title = "小单位单价")
    private BigDecimal priceSmall;
    @Schema(title = "中单位单价")
    private BigDecimal priceMid;
    @Schema(title = "大单位单价")
    private BigDecimal priceLarge;

    @Schema(title = "总成本")
    private Long cost;
    @Schema(title = "小单位成本")
    private BigDecimal costSmall;
    @Schema(title = "中单位成本")
    private BigDecimal costMid;
    @Schema(title = "大单位成本")
    private BigDecimal costLarge;


}
